package cn.rocksolid.sport.common.context;

import java.io.Serializable;

import cn.rocksolid.sport.common.Constant.AccessType;
import cn.rocksolid.sport.common.Constant.AppType;

public final class RockSolidContextImpl implements RockSolidContext, Serializable {

  private static final long serialVersionUID = 2752575718787615532L;

  private String accessId;

  private AccessType accessType;

  private String token;

  private String clientIp;

  private String agencyId;

  private String appId;

  private AppType appType;

  private String location;

  public RockSolidContextImpl() {
  }

  public RockSolidContextImpl(RockSolidContext rockSolidContext) {
    if (null != rockSolidContext) {
      this.accessId = rockSolidContext.getAccessId();
      this.accessType = rockSolidContext.getAccessType();
      this.token = rockSolidContext.getToken();
      this.clientIp = rockSolidContext.getClientIp();
      this.agencyId = rockSolidContext.getAgencyId();
      this.appId = rockSolidContext.getAppId();
      this.appType = rockSolidContext.getAppType();
      this.location = rockSolidContext.getLocation();
    }
  }

  @Override
  public String getAccessId() {
    return accessId;
  }

  @Override
  public AccessType getAccessType() {
    return accessType;
  }

  @Override
  public String getToken() {
    return token;
  }

  @Override
  public String getClientIp() {
    return clientIp;
  }

  @Override
  public String getAgencyId() {
    return agencyId;
  }

  @Override
  public String getAppId() {
    return appId;
  }

  @Override
  public AppType getAppType() {
    return appType;
  }

  @Override
  public String getLocation() {
    return location;
  }

  public void setAccessId(String accessId) {
    this.accessId = accessId;
  }

  public void setAccessType(AccessType accessorType) {
    this.accessType = accessorType;
  }

  public void setToken(String token) {
    this.token = token;
  }

  public void setClientIp(String clientIp) {
    this.clientIp = clientIp;
  }

  public void setAgencyId(String agencyId) {
    this.agencyId = agencyId;
  }

  public void setAppId(String appId) {
    this.appId = appId;
  }

  public void setAppType(AppType appType) {
    this.appType = appType;
  }

  public void setLocation(String location) {
    this.location = location;
  }
}
